/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package be.vdab.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 *
 * @author lok1105
 */
@Controller
@RequestMapping("/leningen")
class LeningController {
    @RequestMapping(value="toevoegen", method= RequestMethod.GET)
    public String createForm1(){
        return "leningen/toevoegen1";
    }
    
    @RequestMapping(value="toevoegen", method= RequestMethod.POST, 
            params="van1naar2")
    public String createForm1Naar2(){
        return "leningen/toevoegen2";
    }
    
    @RequestMapping(value="toevoegen", method= RequestMethod.POST, 
            params="van2naar1")
    public String createForm2Naar1(){
        return "leningen/toevoegen1";
    }
    @RequestMapping(value="toevoegen", method= RequestMethod.POST, 
            params="van2naar3")
    public String createForm2Naar3(){
        return "leningen/toevoegen3";
    }
    
    @RequestMapping(value="toevoegen", method= RequestMethod.POST, 
            params="van3naar2")
    public String createForm3Naar2(){
        return "leningen/toevoegen2";
    }
    
    @RequestMapping(value="toevoegen", method= RequestMethod.POST, 
            params="bevestigen")
    public String create(){
        System.out.println("Lening record toevoegen aan de database");
        return "redirect:/";
    }
}
